package ru.amse.ilyin.diagram.impl;

import java.awt.Point;

import ru.amse.ilyin.diagram.Element;

abstract class AbstractElement implements Element {
	private Point location = new Point();

	/**
	 * Returns location of an element.
	 * 
	 * @return element location
	 */
	public Point getLocation() {
		return new Point(location);
	}

	/**
	 * Sets location of an element.
	 * 
	 * @param location new element location
	 */
	public void setLocation(Point location) {
		this.location = new Point(location);
	}

	/**
	 * Returns element name.
	 * 
	 * @return element name
	 */
	public abstract String getName();
	
	/**
	 * Returns center of an element.
	 * 
	 * @return center of an element
	 */
	public abstract Point getCenter();
}
